package com.gxuwz.business.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.gxuwz.business.dao.impl.RecMedDAO;
import com.gxuwz.business.entity.RecMed;
import com.gxuwz.business.service.IRecMedService;

@Service("recMedService")
public class RecMedServiceImpl implements IRecMedService {
	
	@Autowired
	private RecMedDAO recMedDAO;

	@Override
	public boolean add(RecMed recMed) {
		return recMedDAO.save(recMed);
	}

	@Override
	public boolean update(RecMed recMed) {
		return false;
		
	}

	@Override
	public boolean delete(RecMed recMed) {
		return false;
		
	}

	@Override
	public RecMed findById(String recMedId) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<RecMed> getRightAll() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<String> getAllMedId(String recipeId) {
		return recMedDAO.getAllMedId(recipeId);
	}

	@Override
	public RecMed findByRecMedId(String recipeId, String medId) {
		return recMedDAO.findByRecMedId(recipeId, medId);
	}
	
	/**
	 * 根据处编查询其所有药品总价
	 */
	public List<Double> getFeeByRecId(String recipeId){
		return recMedDAO.getFeeByRecId(recipeId);
	}


}
